package org.wanghong.gift.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wanghong.gift.service.ISmsValidateCodeService;
import org.wanghong.gift.util.AjaxResult;

@RestController
@RequestMapping("/sms")
public class SmsValidateCodeController {
    @Autowired
    private ISmsValidateCodeService smsValidateCodeService;
    //通过号码来进行注册，注册验证码
    @GetMapping("/{phone}")
    public AjaxResult sendRegisterCode(@PathVariable("phone")String phone){
        return smsValidateCodeService.sendRegisterCode(phone);
    }
}
